import { $http } from '@escook/request-miniprogram'

uni.$http = $http
console.log(uni.$http);

// $http.baseUrl = 'http://localhost:9999'
$http.baseUrl = 'http://127.0.0.1:5050'
//请求拦截器
$http.beforeRequest = function(options){
	uni.showLoading({
		title:'等一等...正在加载中~'
	})
}
//响应拦截器
$http.afterRequest = function(){
	uni.hideLoading()
}

import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
import uView from 'uview-ui'
Vue.use(uView)
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif